package com.cdn.nodes;
import com.cdn.common.security.annotation.EnableCustomConfig;
import com.cdn.common.security.annotation.EnableRyFeignClients;
import com.cdn.nodes.netty.server.NettyServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

@EnableAsync
@EnableCustomConfig
@EnableRyFeignClients
@SpringBootApplication
public class CdnNodesApplication {

    @Resource
    private NettyServer nettyServer;

    public static void main(String[] args) {
        SpringApplication.run(CdnNodesApplication.class, args);
        System.out.println("边缘节点模块启动成功");
    }

//    @PostConstruct
//    public void startNettyServer() {
//        new Thread(new Runnable() {
//            @Override
//            public void run() {
//                nettyServer.start();
//            }
//        }).start();
//    }


}
